package com.et.machine.manager.vm.test

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.viewbinding.ViewBinding
import com.et.machine.util.Adapter

class TestOutAdapter<V : ViewBinding>(
    call: (binding: V, p: Int, t: Int) -> Unit,
    binding: (inflater: LayoutInflater, parent: ViewGroup) -> V,
    var enabledCount: Int = 48
) : Adapter<Int, V>(call, binding, MutableList(48) { index: Int ->
    index + 1
}) {

    override fun getItemCount(): Int {
        return enabledCount
    }

    fun notifyData(channelEnabled: Int) {
        enabledCount = channelEnabled
        notifyDataSetChanged()
    }
}